/**
 * Arduino两轮小车
 * 
 * 本程序可不受限制的用于学习和教学，商业用途请联系作者。
 * 本程序不对用户因使用程序而造成任何形式的损失负责。
 * 
 * site: http://www.xpstem.com/maker/arduino-vehicle
 * author: billy zhang
 */
 
#ifndef ARDUINO_REMOTECONTROL_VEHICLE_H_
#define ARDUINO_REMOTECONTROL_VEHICLE_H_

#include "XPVehicle.h"
#include "TwoWheelDriven.h"
#include "RemoteReceiver.h"

/**
 * 遥控小车类
 * 
 * 由控制器类决定遥控方式。
 */
class RemoteControlVehicle : public XPVehicle
{
   public:
     RemoteControlVehicle(const TwoWheelDriven& driven, const LedController& ledCtrl, 
          const RemoteReceiver& receiver) 
      : XPVehicle(driven, ledCtrl) , receiver_(receiver)
      {
      }
     void setup() override;
     void drive() override;
     
  private:
    const RemoteReceiver& receiver_;
    
};

#endif
